1. Field of the Invention
This invention relates to a circuit for preventing malfunction operation (malfunction) of a microprocessor (called as "micon" or "microcomputer") which is installed in an air conditioner or the like, and particularly to a circuit for preventing malfunction operation (malfunction) occurring due to an operational unsteady region (malfunction operation region) for a source voltage, which each microprocessor itself has inherently.
2. Description of Related Art
In most of microprocessors which have been hitherto installed in air conditioners or the like, two power sources (main power source and auxiliary power source) are provided and jointly used. The main power source serves to perform a main operation such as a program operation, etc. for a microprocessor, and the auxiliary power source serves to perform an auxiliary operation such as a data holding operation which is required for a data backup owing to the stoppage of power supply (power-supply failure) or the like. In these microprocessors, the voltage of the main power source is set to a relatively large value (for example, 5 [V]) because power consumption due to the main operation is usually large, and the voltage of the auxiliary power source is set to a relatively small value (3 [V]) which is supplied from a battery (auxiliary power source or back-up power source) because power consumption due to the auxiliary operation is small.
When a microprocessor having a back-up power source as described above is actuated, the main operation is preferentially started at all times because the main operation has priority over the auxiliary operation for the following reason. That is, the microprocessor necessarily (inherently) has an unsteady region in a low voltage range (for example, a hatched area between V1 and V2 of a source voltage V of the microprocessor as shown in FIG. 1), which corresponds to a region where the microprocessor itself cannot make a judgment on "normal" or "abnormal" and thus there is a possibility that malfunction occurs (a main clock circuit cannot be actuated)), and a malfunction operation state (a malfunction state where no program can be started because no main clock waveform is generated) which would be caused due to the unsteady region when the voltage level of the power source is reduced must be avoided. Here, the source voltage of the microprocessor is defined as a driving voltage for the microprocessor which is equal to the voltage of the main power source at an ordinary operation time, and to the voltage of the auxiliary power source (back-up power source) at a backup operation time such as a power supply failure (stoppage) time. Therefore, in order to shift the operation of the microprocessor to the auxiliary operation based on a battery (backup power source) at the backup time, the operation must be temporarily shifted to the main operation simultaneously with the rise-up of the power source, and then shifted to the auxiliary operation, except for a case where the microprocessor has been already set to the main operation state. In order to avoid the microcomputer from falling into the unsteady region, a reset circuit as shown in FIG. 2 has been used.
The reset circuit as shown in FIG. 2 has a charge/discharge circuit comprising a resistor R and a capacitor C which is connected across ground and a main power source terminal of the microprocessor 1. The terminal T.sub.54 is supplied with V=+5 {V] from the main power source. The middle (connect) point between the resistor R and the capacitor C is connected to a reset terminal RST of the microprocessor 1. The reset circuit further has a diode which is connected to the resistor R in parallel.
In the reset circuit thus constructed, the capacitor is charged by current supply through the resistor R, and thus the reset terminal RST of the microprocessor 1 is kept to a logically high level state. When the voltage of the main power source falls down due to a power supply failure or the like in the above state, the charges stored in the capacitor C are discharged from the capacitor through the diode D, and thus the reset terminal RST of the microprocessor 1 is set to a logically low level state to reset the microprocessor 1. That is, when the voltage of the main power source is reduced to a prescribed value or less, the microprocessor 1 is automatically reset to prevent the microprocessor from falling into the unsteady region (malfunction operation state).
However, the shift of the microprocessor into the unsteady region cannot be necessarily avoided by the reset circuit as described above. For example, when a backup switch for starting the auxiliary operation (a switch for supplying the battery voltage V.sub.BT =+3 [V] to the microprocessor) is repetitively manipulated in the order of ON-OFF-ON with the main power source switched off because of a requirement on the operation of the microprocessor in a manufacturing process of an air conditioner or for a securing work of securing an air conditioner in a room or the like, in some cases the microprocessor falls into the malfunction operation state where the program cannot be started.
FIG. 3 shows time-variation of voltage values at the respective parts of the microprocessor, a "micon" source voltage V.sub.DD (solid line), a battery voltage V.sub.BT (one-dotted chain line), a reset terminal voltage V.sub.RST (two-dotted chain line) and a main clock oscillation voltage V.sub.4.19 (4.19[MHz]: fine line) of the microprocessor, and variation of an operation mode to explain the occurrence of the malfunction operation as described above.
In FIG. 3, a power supply failure state (backup state; auxiliary operation) continues until t1, and then the backup switch is switched from on-state to off-state at t1. At t2 the backup switch is switched from off-state to on-state to set the microprocessor to the power supply failure state, and then at t3 the main power source (main switch) is switched on to set the microprocessor to a normal operation state. As is apparent from FIG. 3, if a period between the two power supply failure states (backup states) is long, the source voltage V.sub.DD of the microprocessor is liable to be reduced to a value within the unsteady region (i.e., the microprocessor is liable to fall into the unsteady region). Once the source voltage V.sub.DD of the microprocessor falls into the unsteady region, no oscillation waveform of clocks appears after t3 (see fine line V.sub.4.19) even when the source voltage V.sub.DD is increased from the unsteady region to the power supply failure state and then to the normal operation state, so that the microprocessor falls into the malfunction operation state.
In order to avoid such a disadvantage has been proposed and known a switching circuit which is provided with the above sequence of "temporarily setting the operation of the microprocessor to the main operation when the power source rises up and then shifting it to the auxiliary operation" as a program, and performs a switching operation so that no backup voltage is output when the voltage of the main power source does not reach an initial voltage at which a switching portion operates.
However, the switching circuit having the sequence as described above must be designed in a large and complicated construction, and thus a manufacturing cost for the circuit rises up, so that a manufacturing cost for a target equipment such as an air conditioner to which the microprocessor is mounted, also rises up remarkably.